<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
 <div id="app">
     <input type="button" value="修改message" @click="setm">
     <input type="text" v-model="message" @keyup.enter="getm">
     <h2>{{message}}</h2>
 </div>
<!-- 开发环境版本，包含了有帮助的命令行警告 -->
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
 <script>
     var app = new Vue({
         el:"#app",
         data:{
             message: "吴昊"
         },
         methods: {
             getm:function () {
                 alert(this.message);
             },
             setm:function () {
                 this.message="五五";
             }
         }

     })
 </script>
</body>
</html>